package com.medusa.aps.business.modules.modeling.model.input;

import com.medusa.aps.business.modules.modeling.mp.entity.WorkingProcedureAuxiliary;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author miskw
 */
@Data
@Accessors(chain = true)
@Schema(description = "工序辅助实体")
public class WorkingProcedureAuxiliaryDTO {
    /**
     * 工序设备id
     */
    @Schema(description = "工序设备id")
    private Integer procedureEquipmentId;
    /**
     * 辅助id
     */
    @Schema(description = "辅助id")
    private Integer auxiliaryId;
    /**
     * 辅助编码
     */
    @Schema(description = "辅助编码")
    private String auxiliaryDataCoding;
    /**
     * 辅助资源名称
     */
    @Schema(description = "辅助资源名称")
    private String auxiliaryResourceName;

    public WorkingProcedureAuxiliary toWorkingProcedureAuxiliary(Integer procedureId, Integer procedureEquipmentId) {
        return new WorkingProcedureAuxiliary()
                .setAuxiliaryId(auxiliaryId)
                .setAuxiliaryDataCoding(auxiliaryDataCoding)
                .setAuxiliaryResourceName(auxiliaryResourceName)
                .setProcedureEquipmentId(procedureEquipmentId)
                .setWorkingProcedureId(procedureId);
    }
}